<template>
  <div>
    <TypeNav />
    <ListContainer />, <Recommend />, <Rank />, <Like />, <Floor v-for="(item, index) in floorList" :key="index" :item="item" />,
    <Brand />
  </div>
</template>

<script>
// import { reqSwiperList } from '@/api/index'
import { mapActions, mapState } from 'vuex'
import ListContainer from './ListContainer'
import Recommend from './Recommend'
import Rank from './Rank'
import Like from './Like'
import Floor from './Floor'
import Brand from './Brand'
export default {
  name: 'HomeView',
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  computed: {
    ...mapState('home', ['floorList'])
  },
  methods: {
    ...mapActions('home', ['getSwiperList', 'getFloorList'])
  },
  // 测试封装接口后是否获取数据成功
  async created() {
    this.getFloorList()
    this.getSwiperList()
  }
}
</script>

<style lang="less" scoped></style>
